// 云函数入口文件
const cloud = require('wx-server-sdk')
const rq = require("request-promise")
cloud.init()

// 云函数入口函数
exports.main = async (event, context) => {
    const wxContext = cloud.getWXContext()
    let url = `https://api.wmdb.tv/movie/api?id=${event.id}`
    return rq(url).then(res=>{
       return res
    }).catch(err=>{
        console.log(err)
    })
}